package rahmath.sharif.docrypt.util;

import java.util.Comparator;

import rahmath.sharif.docrypt.ExplorerListItem;

public class ExplorerListComparator implements Comparator<ExplorerListItem> {
	public int compare(ExplorerListItem eli1, ExplorerListItem eli2) {
		if (eli1.getDrawableInt() == eli2.getDrawableInt()) {
			return new FileComparator().compare(eli1.getIoFile(), eli2.getIoFile());
		} else {
			return eli1.getDrawableInt() - eli2.getDrawableInt();
		}
	}
}
